﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using QstkCore;
using QstkCore.DataAccess;

namespace Tests
{
    [TestClass]
    public class DateUtilTests
    {
        [TestMethod]
        public void TestGetNyseDays()
        {
            var startday = new DateTime(2008, 1, 1);
            var endday = new DateTime(2010, 12, 31);
            var timeofday = TimeSpan.FromHours(16);

            IEnumerable<DateTime> days = Nyse.GetTradingDates(startday, endday, timeofday);

            Assert.AreEqual(days.Count(), 756);
        }
    }
}
